USE [master]
GO

/****** Object:  Database [Calificador_Premios_Academia]    Script Date: 11/26/2012 23:00:22 ******/
CREATE DATABASE [Calificador_Premios_Academia] ON  PRIMARY 
( NAME = N'Calificador_Premios_Academia', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL10.SQLSERVER\MSSQL\DATA\Calificador_Premios_Academia.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON 
( NAME = N'Calificador_Premios_Academia_log', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL10.SQLSERVER\MSSQL\DATA\Calificador_Premios_Academia_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO

ALTER DATABASE [Calificador_Premios_Academia] SET COMPATIBILITY_LEVEL = 100
GO

IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [Calificador_Premios_Academia].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO

ALTER DATABASE [Calificador_Premios_Academia] SET ANSI_NULL_DEFAULT OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET ANSI_NULLS OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET ANSI_PADDING OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET ANSI_WARNINGS OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET ARITHABORT OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET AUTO_CLOSE OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET AUTO_CREATE_STATISTICS ON 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET AUTO_SHRINK OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET AUTO_UPDATE_STATISTICS ON 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET CURSOR_DEFAULT  GLOBAL 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET CONCAT_NULL_YIELDS_NULL OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET NUMERIC_ROUNDABORT OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET QUOTED_IDENTIFIER OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET RECURSIVE_TRIGGERS OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET  DISABLE_BROKER 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET TRUSTWORTHY OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET ALLOW_SNAPSHOT_ISOLATION OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET PARAMETERIZATION SIMPLE 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET READ_COMMITTED_SNAPSHOT OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET HONOR_BROKER_PRIORITY OFF 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET  READ_WRITE 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET RECOVERY FULL 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET  MULTI_USER 
GO

ALTER DATABASE [Calificador_Premios_Academia] SET PAGE_VERIFY CHECKSUM  
GO

ALTER DATABASE [Calificador_Premios_Academia] SET DB_CHAINING OFF 
GO



USE [Calificador_Premios_Academia]
GO
/****** Object:  Table [dbo].[Tipo_Nominacion]    Script Date: 11/27/2012 00:05:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Tipo_Nominacion](
	[id_tipo_nominacion] [char](5) NOT NULL,
	[nombre_tipo_nominacion] [varchar](50) NOT NULL,
	[descripcion_tipo_nominacion] [varchar](50) NOT NULL,
 CONSTRAINT [PK_Tipo_Nominacion] PRIMARY KEY CLUSTERED 
(
	[id_tipo_nominacion] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Pais]    Script Date: 11/27/2012 00:05:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Pais](
	[id_pais] [char](2) NOT NULL,
	[nombre_pais] [varchar](50) NOT NULL,
 CONSTRAINT [PK_Pais] PRIMARY KEY CLUSTERED 
(
	[id_pais] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Ceremonia]    Script Date: 11/27/2012 00:05:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Ceremonia](
	[id_ceremonia] [char](5) NOT NULL,
	[fecha_inicio_ceremonia] [datetime] NOT NULL,
	[fecha_fin_ceremonia] [datetime] NOT NULL,
	[descripcion_ceremonia] [varchar](50) NOT NULL,
 CONSTRAINT [PK_Ceremonia] PRIMARY KEY CLUSTERED 
(
	[id_ceremonia] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Categoria]    Script Date: 11/27/2012 00:05:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Categoria](
	[id_categoria] [char](5) NOT NULL,
	[nombre_categoria] [varchar](50) NOT NULL,
	[descripcion_categoria] [varchar](50) NOT NULL,
 CONSTRAINT [PK_Categoria] PRIMARY KEY CLUSTERED 
(
	[id_categoria] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Administrador]    Script Date: 11/27/2012 00:05:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Administrador](
	[id_aministrador] [varchar](50) NOT NULL,
	[id_ceremonia] [char](5) NOT NULL,
	[contrasenia_administrador] [nchar](10) NOT NULL,
 CONSTRAINT [PK_Administrador] PRIMARY KEY CLUSTERED 
(
	[id_aministrador] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[CeremoniaXCategoria]    Script Date: 11/27/2012 00:05:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[CeremoniaXCategoria](
	[id_ceremonia] [char](5) NOT NULL,
	[id_categoria] [char](5) NOT NULL,
 CONSTRAINT [PK_CeremoniaXCategoria] PRIMARY KEY CLUSTERED 
(
	[id_ceremonia] ASC,
	[id_categoria] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Tipo_Votante]    Script Date: 11/27/2012 00:05:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Tipo_Votante](
	[id_tipo_votante] [char](5) NOT NULL,
	[id_ceremonia] [char](5) NOT NULL,
	[nombre_tipo_votante] [varchar](50) NOT NULL,
	[descripcion_tipo_votante] [varchar](50) NOT NULL,
	[fecha_inicio_votacion] [datetime] NOT NULL,
	[fecha_fin_votacion] [datetime] NOT NULL,
	[minutos_gracia] [smallint] NOT NULL,
 CONSTRAINT [PK_Tipo_Votante] PRIMARY KEY CLUSTERED 
(
	[id_tipo_votante] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[AdministradorXCeremonia]    Script Date: 11/27/2012 00:05:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[AdministradorXCeremonia](
	[id_administrador] [varchar](50) NOT NULL,
	[id_cremonia] [char](5) NOT NULL,
 CONSTRAINT [PK_AdministradorXCeremonia] PRIMARY KEY CLUSTERED 
(
	[id_administrador] ASC,
	[id_cremonia] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Nominado]    Script Date: 11/27/2012 00:05:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Nominado](
	[id_nominado] [char](5) NOT NULL,
	[id_tipo_nominacion] [char](5) NOT NULL,
	[nombre_nominado] [varchar](50) NOT NULL,
	[apellido_nominado] [varchar](50) NOT NULL,
	[id_pais] [char](2) NOT NULL,
	[designado] [bit] NOT NULL,
	[foto_nominado] [varchar](50) NOT NULL,
 CONSTRAINT [PK_Nominado] PRIMARY KEY CLUSTERED 
(
	[id_nominado] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[NominadoXCategoria]    Script Date: 11/27/2012 00:05:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[NominadoXCategoria](
	[id_nominado] [char](5) NOT NULL,
	[id_categoria] [char](5) NOT NULL,
 CONSTRAINT [PK_NominadoXPelicula] PRIMARY KEY CLUSTERED 
(
	[id_nominado] ASC,
	[id_categoria] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Votante]    Script Date: 11/27/2012 00:05:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Votante](
	[email_votante] [varchar](50) NOT NULL,
	[contrasenia_votante] [nchar](10) NOT NULL,
	[nombre_votante] [varchar](50) NOT NULL,
	[apellido_votante] [varchar](50) NOT NULL,
	[id_tipo_votante] [char](5) NOT NULL,
	[id_pais] [char](2) NOT NULL,
 CONSTRAINT [PK_Votante] PRIMARY KEY CLUSTERED 
(
	[email_votante] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Voto]    Script Date: 11/27/2012 00:05:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Voto](
	[id_voto] [char](5) NOT NULL,
	[email_votante] [varchar](50) NOT NULL,
	[id_nominado] [char](5) NOT NULL,
	[id_ceremonia] [char](5) NOT NULL,
	[fecha_voto] [datetime] NOT NULL,
 CONSTRAINT [PK_Voto] PRIMARY KEY CLUSTERED 
(
	[id_voto] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[CermoniaXVotante]    Script Date: 11/27/2012 00:05:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[CermoniaXVotante](
	[id_ceremonia] [char](5) NOT NULL,
	[email_votante] [varchar](50) NOT NULL,
 CONSTRAINT [PK_CermoniaXVotante] PRIMARY KEY CLUSTERED 
(
	[id_ceremonia] ASC,
	[email_votante] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[CeremoniaXVoto]    Script Date: 11/27/2012 00:05:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[CeremoniaXVoto](
	[id_ceremonia] [char](5) NOT NULL,
	[id_voto] [char](5) NOT NULL,
 CONSTRAINT [PK_CeremoniaXVoto] PRIMARY KEY CLUSTERED 
(
	[id_ceremonia] ASC,
	[id_voto] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  ForeignKey [FK_AdministradorXCeremonia_Administrador]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[AdministradorXCeremonia]  WITH CHECK ADD  CONSTRAINT [FK_AdministradorXCeremonia_Administrador] FOREIGN KEY([id_administrador])
REFERENCES [dbo].[Administrador] ([id_aministrador])
GO
ALTER TABLE [dbo].[AdministradorXCeremonia] CHECK CONSTRAINT [FK_AdministradorXCeremonia_Administrador]
GO
/****** Object:  ForeignKey [FK_AdministradorXCeremonia_Ceremonia]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[AdministradorXCeremonia]  WITH CHECK ADD  CONSTRAINT [FK_AdministradorXCeremonia_Ceremonia] FOREIGN KEY([id_cremonia])
REFERENCES [dbo].[Ceremonia] ([id_ceremonia])
GO
ALTER TABLE [dbo].[AdministradorXCeremonia] CHECK CONSTRAINT [FK_AdministradorXCeremonia_Ceremonia]
GO
/****** Object:  ForeignKey [FK_CeremoniaXCategoria_Categoria]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[CeremoniaXCategoria]  WITH CHECK ADD  CONSTRAINT [FK_CeremoniaXCategoria_Categoria] FOREIGN KEY([id_categoria])
REFERENCES [dbo].[Categoria] ([id_categoria])
GO
ALTER TABLE [dbo].[CeremoniaXCategoria] CHECK CONSTRAINT [FK_CeremoniaXCategoria_Categoria]
GO
/****** Object:  ForeignKey [FK_CeremoniaXCategoria_Ceremonia]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[CeremoniaXCategoria]  WITH CHECK ADD  CONSTRAINT [FK_CeremoniaXCategoria_Ceremonia] FOREIGN KEY([id_ceremonia])
REFERENCES [dbo].[Ceremonia] ([id_ceremonia])
GO
ALTER TABLE [dbo].[CeremoniaXCategoria] CHECK CONSTRAINT [FK_CeremoniaXCategoria_Ceremonia]
GO
/****** Object:  ForeignKey [FK_CeremoniaXVoto_Ceremonia]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[CeremoniaXVoto]  WITH CHECK ADD  CONSTRAINT [FK_CeremoniaXVoto_Ceremonia] FOREIGN KEY([id_ceremonia])
REFERENCES [dbo].[Ceremonia] ([id_ceremonia])
GO
ALTER TABLE [dbo].[CeremoniaXVoto] CHECK CONSTRAINT [FK_CeremoniaXVoto_Ceremonia]
GO
/****** Object:  ForeignKey [FK_CeremoniaXVoto_Voto]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[CeremoniaXVoto]  WITH CHECK ADD  CONSTRAINT [FK_CeremoniaXVoto_Voto] FOREIGN KEY([id_voto])
REFERENCES [dbo].[Voto] ([id_voto])
GO
ALTER TABLE [dbo].[CeremoniaXVoto] CHECK CONSTRAINT [FK_CeremoniaXVoto_Voto]
GO
/****** Object:  ForeignKey [FK_CermoniaXVotante_Ceremonia]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[CermoniaXVotante]  WITH CHECK ADD  CONSTRAINT [FK_CermoniaXVotante_Ceremonia] FOREIGN KEY([id_ceremonia])
REFERENCES [dbo].[Ceremonia] ([id_ceremonia])
GO
ALTER TABLE [dbo].[CermoniaXVotante] CHECK CONSTRAINT [FK_CermoniaXVotante_Ceremonia]
GO
/****** Object:  ForeignKey [FK_CermoniaXVotante_Votante]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[CermoniaXVotante]  WITH CHECK ADD  CONSTRAINT [FK_CermoniaXVotante_Votante] FOREIGN KEY([email_votante])
REFERENCES [dbo].[Votante] ([email_votante])
GO
ALTER TABLE [dbo].[CermoniaXVotante] CHECK CONSTRAINT [FK_CermoniaXVotante_Votante]
GO
/****** Object:  ForeignKey [FK_Nominado_Pais]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[Nominado]  WITH CHECK ADD  CONSTRAINT [FK_Nominado_Pais] FOREIGN KEY([id_pais])
REFERENCES [dbo].[Pais] ([id_pais])
GO
ALTER TABLE [dbo].[Nominado] CHECK CONSTRAINT [FK_Nominado_Pais]
GO
/****** Object:  ForeignKey [FK_Nominado_Tipo_Nominacion]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[Nominado]  WITH CHECK ADD  CONSTRAINT [FK_Nominado_Tipo_Nominacion] FOREIGN KEY([id_tipo_nominacion])
REFERENCES [dbo].[Tipo_Nominacion] ([id_tipo_nominacion])
GO
ALTER TABLE [dbo].[Nominado] CHECK CONSTRAINT [FK_Nominado_Tipo_Nominacion]
GO
/****** Object:  ForeignKey [FK_NominadoXCategoria_Categoria1]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[NominadoXCategoria]  WITH CHECK ADD  CONSTRAINT [FK_NominadoXCategoria_Categoria1] FOREIGN KEY([id_categoria])
REFERENCES [dbo].[Categoria] ([id_categoria])
GO
ALTER TABLE [dbo].[NominadoXCategoria] CHECK CONSTRAINT [FK_NominadoXCategoria_Categoria1]
GO
/****** Object:  ForeignKey [FK_NominadoXCategoria_Nominado]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[NominadoXCategoria]  WITH CHECK ADD  CONSTRAINT [FK_NominadoXCategoria_Nominado] FOREIGN KEY([id_nominado])
REFERENCES [dbo].[Nominado] ([id_nominado])
GO
ALTER TABLE [dbo].[NominadoXCategoria] CHECK CONSTRAINT [FK_NominadoXCategoria_Nominado]
GO
/****** Object:  ForeignKey [FK_Tipo_Votante_Ceremonia]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[Tipo_Votante]  WITH CHECK ADD  CONSTRAINT [FK_Tipo_Votante_Ceremonia] FOREIGN KEY([id_ceremonia])
REFERENCES [dbo].[Ceremonia] ([id_ceremonia])
GO
ALTER TABLE [dbo].[Tipo_Votante] CHECK CONSTRAINT [FK_Tipo_Votante_Ceremonia]
GO
/****** Object:  ForeignKey [FK_Votante_Pais]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[Votante]  WITH CHECK ADD  CONSTRAINT [FK_Votante_Pais] FOREIGN KEY([id_pais])
REFERENCES [dbo].[Pais] ([id_pais])
GO
ALTER TABLE [dbo].[Votante] CHECK CONSTRAINT [FK_Votante_Pais]
GO
/****** Object:  ForeignKey [FK_Votante_Tipo_Votante]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[Votante]  WITH CHECK ADD  CONSTRAINT [FK_Votante_Tipo_Votante] FOREIGN KEY([id_tipo_votante])
REFERENCES [dbo].[Tipo_Votante] ([id_tipo_votante])
GO
ALTER TABLE [dbo].[Votante] CHECK CONSTRAINT [FK_Votante_Tipo_Votante]
GO
/****** Object:  ForeignKey [FK_Voto_Nominado]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[Voto]  WITH CHECK ADD  CONSTRAINT [FK_Voto_Nominado] FOREIGN KEY([id_nominado])
REFERENCES [dbo].[Nominado] ([id_nominado])
GO
ALTER TABLE [dbo].[Voto] CHECK CONSTRAINT [FK_Voto_Nominado]
GO
/****** Object:  ForeignKey [FK_Voto_Votante]    Script Date: 11/27/2012 00:05:19 ******/
ALTER TABLE [dbo].[Voto]  WITH CHECK ADD  CONSTRAINT [FK_Voto_Votante] FOREIGN KEY([email_votante])
REFERENCES [dbo].[Votante] ([email_votante])
GO
ALTER TABLE [dbo].[Voto] CHECK CONSTRAINT [FK_Voto_Votante]
GO
